﻿using Microsoft.Extensions.Logging;
using SingleBlog.Core.Services;

namespace SingleBlog
{
    using Framework.Logger;
    using System;

    public static class BlogLoggerExtension
    {
        public static ILoggerFactory AddBlogLogger(this ILoggerFactory loggerFactory,IServiceProvider serviceProvider, Func<LogLevel, bool> filter = default(Func<LogLevel, bool>))
        {
            loggerFactory.AddProvider(new BlogLoggerProvider(serviceProvider, filter));
            return loggerFactory;
        }
    }
}
